package com.unity3d.networkapp9;

//{"age":30,"name":"张三", "isstudent":true}
/*
* 字段的名称和类型要求严格一致
* */

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

/*object1
{ "age":20,"name":"张三", "isstudent":true,"class":{"grade":"18级","classname":"计算机科学与技术"} }
 */

/*object3
{ "grade":"20级","classname":"计算机科学与技术","students":
[
{ "id":"001","age":30,"name":"张三", "isstudent":false },
{ "id":"002","age":25,"name":"李四111", "isstudent":true },
{ "id":"003","age":26,"name":"王1111五", "isstudent":true }
]}
 */
/*
public class Student {
    public int age;
    public String name;
    public boolean isstudent;

    //设置注解，解决关键字重复
    @SerializedName("class")
    public MyClass class1;

    public class MyClass{
        public String grade;
        public String classname;
    }

}
*/


public class Student{
    public String grade;
    public String classname;

    /*public MyStudent[] students;*/
    public List<MyStudent> students;

    public class MyStudent{
        public String id;
        public int age;
        public String name;
        public boolean isstudent;
    }
}
